# Maintainer: David Runge <dvzrv@archlinux.org>

_name=fltk
pkgname=ntk
pkgver=1.3.1001
pkgrel=2
pkgdesc="Fork of FLTK 1.3.0 with additional functionality."
arch=(loong64 x86_64)
url="https://non.tuxfamily.org/wiki/NTK"
license=(custom)
depends=(
  cairo
  gcc-libs
  fontconfig
  glibc
  freetype2
  libglvnd
  libjpeg
  libpng
  libx11
  libxft
  zlib
)
makedepends=(waf)
provides=(
  libntk.so
  libntk_images.so
)
source=(https://github.com/linuxaudio/$pkgname/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
sha512sums=('b1c1b4ad87c74b11da52c90b6167602286b7d46c2a0217bf24972415400e922714dcec1908116b0daeb1bc2f07f89d591aa21cca404d59ddbb7f1fa831417fa5')
b2sums=('d60784188112499c2cc4de5e30fefa4959b4e6ea0f04a43390ece35da72d474e24659a8f17aa76f63eab4dcca724873e9798bf99a7dc4438e1b9b6d88daf294b')

build() {
  cd $pkgname-$pkgver
  export LINKFLAGS="$LDFLAGS"
  waf configure --prefix=/usr
  waf build
}

package() {
  cd $pkgname-$pkgver
  waf --destdir="$pkgdir/" install
  install -vDm 644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 {CREDITS,README} -t "$pkgdir/usr/share/doc/$pkgname/"
}
